<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <link rel="stylesheet" href="./css/my.css">

    <!-- <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script> -->
    <script src="./js/bootstrap.bundle.min.js"></script>
    <title>订单管理-增加订单</title>
</head>

<body>
    <div class="container text-center">
        <!-- 导航栏 -->
        <nav class="navbar navbar-expand-sm navbar-primary text-muted justify-content-center"
            style="background-color: #e3f2fd;" data-bs-theme="light">
            <!-- Brand -->
            <a class="navbar-brand" href="#">Logo</a>
            <!-- Links -->
            <ul class="navbar-nav">
                <!-- Dropdown -->
                <!-- <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-bs-toggle="dropdown">
                        订单管理
                    </a>
                    <div class="dropdown-menu">
                        <a class="dropdown-item" href="/manager.html">查询订单</a>
                        <a class="dropdown-item" href="#">增加订单</a>
                        <a class="dropdown-item" href="#">修改订单</a>
                        <a class="dropdown-item" href="#">删除订单</a>
                    </div>
                </li> -->
                <li class="nav-item">
                    <a class="nav-link active" href="/manager.html">查询订单</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="/addOrder.html">增加订单</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">修改订单</a>
                </li>
            </ul>
        </nav>
        <container>
            <form class="row g-3" method="POST" action="addsql.php">
                <div class="col-md-3">
                    <label for="ProductNum" class="form-label">产品编号</label>
                    <input type="number" class="form-control" id="ProductNum" placeholder="11位数字" name="ProductNum">
                </div>
                <div class="col-md-3">
                    <label for="ProductModel" class="form-label">产品型号</label>
                    <input type="text" class="form-control" id="ProductModel" placeholder="LD-A" name="ProductModel">
                </div>
                <div class="col-md-3">
                    <label for="ProductName" class="form-label">产品名称</label>
                    <input type="text" class="form-control" id="ProductName" placeholder="12寸 本安型显示器"
                        name="ProductName">
                </div>
                <div class="col-md-3">
                    <label for="OrderDate" class="form-label">下单日期</label>
                    <input type="text" class="form-control" id="OrderDate" placeholder="2025-06-01" name="OrderDate">
                </div>
                <div class="col-md-3">
                    <label for="CustomerName" class="form-label">客户名称</label>
                    <input type="text" class="form-control" id="CustomerName" placeholder="某公司" name="CustomerName">
                </div>
                <div class="col-md-3">
                    <label for="inputSales" class="form-label">销售</label>
                    <select id="inputSales" class="form-select" name="Sales">
                        <option>刘家成</option>
                        <option>徐玉梅</option>
                        <option>朱家帅</option>
                        <option>刘璇</option>
                    </select>
                </div>
                <div class="col-md-3">
                    <label for="inputState" class="form-label">完成进度</label>
                    <select id="inputState" class="form-select" name="Complete">
                        <option value="designing">设计中</option>
                        <option value="cutting">下料中</option>
                        <option value="welding">焊接中</option>
                        <option value="assemble">装配中</option>
                        <option value="testing">测试中</option>
                        <option value="success">完成</option>
                    </select>
                </div>
                <div class="col-md-3">
                    <label for="PlanDays" class="form-label">预计完成天数</label>
                    <input type="number" class="form-control" id="PlanDays" placeholder="9" name="PlanDays">
                </div>
                <div class="col-md-12">
                    <label for="Ps" class="form-label">备注</label>
                    <textarea type="text" class="form-control" name="Ps"></textarea>
                </div>
                <div class="col-md-6">
                    <button type="submit" class="btn btn-primary" value="提交">提交</button>
                </div>
                <div class="col-md-6">
                    <button type="submit" class="btn btn-primary" href="/manager.html" value="返回">返回</button>
                </div>
            </form>
        </container>

    </div>

    </div>
    </div>
    <script>
        // 使用 JavaScript 监听下拉选项框的变化
        document.getElementById('inputState').addEventListener('change', function () {
            // 根据选中的值动态设置背景颜色
            this.style.backgroundColor = this.value === 'designing' ? '#f0f8ff' :
                                        this.value === 'cutting' ? '#ff0000' :
                                        this.value === 'welding' ? '#0000ff' : 
                                        this.value === 'assemble' ? '#ffff00' : 
                                        this.value === 'testing' ? '#808080' : 
                                        this.value === 'success' ? '#008000' : 
                                        '';
        });
    </script>
</body>

</html>